Universidade Federal de Viçosa
Programa de pós-graduação em Genética e Melhoramento
Departamento de Biologia Geral
A new look on the genotype-by-environment interaction: enviromics and probabilistic models
Prof. Dr. Kaio Olimpio das Graças Dias
Dr. Saulo Fabrício da Silva Chaves
data = read.csv('https://raw.githubusercontent.com/Kaio-Olimpio/Probability-for-GEI/master/maize_dataset.csv',
stringsAsFactors = TRUE)
data = transform(data, Rep = as.factor(Rep), Block = as.factor(Block))
ngen = nlevels(data$Hybrid)
nrep = nlevels(data$Rep)
nblock = nlevels(data$Block)
nloc = nlevels(data$Location)ANOVA-based methods
Regression-based methods
Non-parametric/risk-based methods
Multivariate methods
Mixed Models
Bayesian Models
Bayesian inference is reallocation of credibility across possibilities
The possibilities to which we assign credibility (probability) are the parameter values within meaningful mathematical models
\[ P(Culprint = Butler) = 20\% \]
\[ P(Culprint = Cook) = 80\% \] \[ Culprint = (Butler, Cook) \]
\[ P(Weapon | Culprint) \]
\[ P(Culprint = Cook) = 80\% \]
\[ P(Weapon = Pistol | Culprint = Cook) = 5\% \]
\[ P(Weapon = Pistol, Culprint = Cook) = 80\% \times 5\% = 4\% \]
\[ P(Weapon, Culprint) = P(Weapon|Culprint) \times P(Culprint) \]
PRODUCT RULE
\[ P(x, y) = P(y|x) \times p(x) \]
SUM RULE
\[ P(x) = \sum_{y}^{} P(x,y) \]
Cook = 20%
Butler = 80%
\[ P(x,y) = P(y|x)P(x) = P(x|y)P(y) \]
\[ \frac{P(y|x)P(x)}{P(x)} = \frac{P(x|y)P(y)}{P(x)} \]
\[ P(y|x) = \frac{P(x|y)P(y)}{P(x)} \]
\[ P(\theta|y) = \frac{P(y|\theta)P(\theta)}{P(y)} \]
\(P(\theta)\) = PRIOR belief before making a particular obs.
\(P(\theta|y)\) = POSTERIOR belief after making the obs.
\(P(y|\theta)\) = LIKELIHOOD
\[ y = \alpha + \beta x + \epsilon \]
\[\epsilon \sim N(0, \sigma) \]
\[ P(\alpha, \beta , \sigma |y, x) \propto P(y|x, \alpha , \beta, \sigma) P(\alpha) P(\beta) P(\sigma) P(x) \]
\[ y_{jklm} \sim N(E[y_{jklm}], \sigma)\]
\[ E[y_{jklm}] = \mu + g_{j} + e_{k} + r_{m(k)} + b_{l(mr)} + (ge)_{jk} \]
\[ \mu \sim N (0, S^{[\mu]}) \]
\[ g_{j} \sim N (0, S^{[g]}) \]
\[ S^{\mu} \sim HalfCauchy(0, \phi) \]
Probability of superior performance
Which candidates are the top performers?
What is the risk of recommending a given candidate (performance)?
\[ Pr(\hat{g}_j \in \Omega \vert y) = \frac{1}{S} \sum_{s=1}^S I(\hat{g}_j^{(s)} \in \Omega \vert y) \]
\[ \begin{cases} \hat{g}_j \in \Omega \rightarrow I(\hat{g}_j^{(s)} \in \Omega \vert y) = 1 \\ \hat{g}_j \notin \Omega \rightarrow I(\hat{g}_j^{(s)} \in \Omega \vert y) = 0 \end{cases} \]
\(S = (\hat{g}_j \in \Omega) + (\hat{g}_j \notin \Omega)\)
\[ Pr\left[ Var(\widehat{ge}_{jk}) \in \Omega \vert y \right] = \frac{1}{S} \sum_{s=1}^S I \left[ Var(\widehat{ge}_{jk}^{(s)}) \in \Omega \vert y \right] \]
\[ \begin{cases} Var(\widehat{ge}_{jk}) \in \Omega \rightarrow I \left[ Var(\widehat{ge}_{jk}^{(s)}) \in \Omega \vert y \right] = 1 \\ Var(\widehat{ge}_{jk}) \notin \Omega \rightarrow I \left[ Var(\widehat{ge}_{jk}^{(s)}) \in \Omega \vert y \right] = 0 \end{cases} \]
Pairwise probability of superior performance/stability
Is candidate x better than candidate y?
What is the probability that x performs better than y in the TPE?
\[ Pr(\hat{g}_{j} > \hat{g}_{j^\prime} \vert y) = \frac{1}{S} \sum_{s=1}^S I(\hat{g}_{j}^{(s)} > \hat{g}_{j^\prime}^{(s)} \vert y) \]
\[ \begin{cases} \hat{g}_{j} > \hat{g}_{j^\prime} \rightarrow I(\hat{g}_{j}^{(s)} > \hat{g}_{j^\prime}^{(s)} \vert y) = 1 \\ \hat{g}_{j} < \hat{g}_{j^\prime} \rightarrow I(\hat{g}_{j}^{(s)} > \hat{g}_{j^\prime}^{(s)} \vert y) = 0 \end{cases} \]
\[ Pr(\hat{g}_j \in \Omega \vert y) \times Pr (Var(\widehat{ge}_{jk}) \in \Omega \vert y)\]
Tip
ProbBreed is a free package, available from CRAN